import { defineStore } from 'pinia';
import { ref } from "vue";
import workApi from "@/http/work/workApi";
import { useUserStore } from "@/stores/user/user";

export const useCloudStore = defineStore('cloud', {
    actions: {
        setData(){
            const user = useUserStore()
            if (user.info.isTeacher) {
                workApi.get("cloud/get").then((res) => {
                    this.data = res.data
                })
            }
        }
    },


    state: () => ({
        data: ref([])
    }),

    getters: {

    },
})
